/*
 * This file is part of b.AMP.
 * 
 * b.AMP is free software: you can redistribute it and/or modify it under 
 * the terms of the GNU Lesser General Public License as published by the 
 * Free Software Foundation, either version 3 of the License, or (at your 
 * option) any later version.
 * 
 * b.AMP is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU lesser General Public 
 * License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with b.AMP.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __BAMP_BASIC_MESSAGE_HPP__
#define __BAMP_BASIC_MESSAGE_HPP__

#include <bamp/message_api.hpp>
#include <bamp/message_ptr.hpp>
#include <memory>
#include <string>

namespace bamp
{

    class BasicMessage : public Message
    {
    public:
        BasicMessage();
        BasicMessage(const std::string& name);
        virtual ~BasicMessage();

        BasicMessage(const BasicMessage& msg);
        BasicMessage& operator=(const BasicMessage& msg);

        BAMP_MESSAGE_DEFINE_CLONE(BasicMessage);

        virtual std::string getName() const;
        virtual void setName(const std::string& name);
        virtual size_t getArgc() const;
        virtual void setArg(const std::string& name, const bamp::Value& value);
        virtual bamp::Value getArg(size_t index) const;
        virtual std::string getArgName(size_t index) const;
        virtual bamp::Value getArgByName(const std::string& name) const;

    private:
        class Implementation;
        std::auto_ptr<Implementation> pimpl;

    };

} // namespace bamp

#endif // __BAMP_BASIC_MESSAGE_HPP__
